import request from '@/utils/request'

// 获取首页统计数据
export function getDashboardStatistics(params) {
  return request({
    url: '/dashboard/statistics',
    method: 'get',
    params: params
  })
}

// 获取模型统计数据
export function getModelStatistics(params) {
  return request({
    url: '/dashboard/model/statistics',
    method: 'get',
    params: params
  })
}

// 获取光谱数据统计
export function getSpectrumStatistics(params) {
  return request({
    url: '/dashboard/spectrum/statistics',
    method: 'get',
    params: params
  })
}

// 获取仪器状态统计
export function getInstrumentStatistics(params) {
  return request({
    url: '/dashboard/instrument/statistics',
    method: 'get',
    params: params
  })
}

// 获取成分统计数据
export function getConstituentStatistics(params) {
  return request({
    url: '/dashboard/constituent/statistics',
    method: 'get',
    params: params
  })
}

// 获取各车间光谱数据量
export function getWorkshopSpectrumData(params) {
  return request({
    url: '/dashboard/workshop/spectrum',
    method: 'get',
    params: params
  })
}

// 获取最近采集的光谱数据
export function getRecentSpectrumData(params) {
  return request({
    url: '/dashboard/recent/spectrum',
    method: 'get',
    params: params
  })
}

// 获取天气信息
export function getWeatherInfo() {
  return request({
    url: '/dashboard/weather',
    method: 'get'
  })
}